<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>gvn.changebranch</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css"></link>
</head>
<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">

<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="gvn-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/gvn/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <font size="-1"><b class="breadcrumbs">
        <a href="gvn-module.html">Package&nbsp;gvn</a> ::
        Module&nbsp;changebranch
      </b></font></br>
    </td>
    <td><table cellpadding="0" cellspacing="0">
      <tr><td align="right"><font size="-2">[<a href="../private/gvn.changebranch-module.html">show&nbsp;private</a>&nbsp;|&nbsp;hide&nbsp;private]</font></td></tr>
      <tr><td align="right"><font size="-2">[<a href="frames.html"target="_top">frames</a>&nbsp;|&nbsp;<a href="gvn.changebranch-module.html" target="_top">no&nbsp;frames</a>]</font></td></tr>
    </table></td>
</tr></table>

<!-- =========== START OF MODULE DESCRIPTION =========== -->
<h2 class="module">Module gvn.changebranch</h2>

<p>changebranch - stuff for change branches</p>
<p>Classes: ChangeBranch -- representation of a change branch</p>
Functions: UserChangeNames -- generate change names of a user 
AllChangeNames -- generate all change names Diff -- diff a change 
branch
<hr/>

<!-- =========== START OF CLASSES =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Classes</th></tr>
<tr><td width="15%">
  <b><a href="gvn.changebranch.ChangeBranch-class.html"><code>ChangeBranch</code></a></b></td>
  <td>Representation of a change branch.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION SUMMARY =========== -->
<table class="summary" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="summary">
  <th colspan="2">Function Summary</th></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#AllChangeNames" class="summary-sig-name"><code>AllChangeNames</code></a>(<span class=summary-sig-arg>project</span>,
          <span class=summary-sig-arg>pool</span>)</span></code>
<br />
Return a generator yielding all change branch names.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#Diff" class="summary-sig-name"><code>Diff</code></a>(<span class=summary-sig-arg>repo</span>,
          <span class=summary-sig-arg>cb</span>,
          <span class=summary-sig-arg>fp</span>,
          <span class=summary-sig-arg>diff_command</span>,
          <span class=summary-sig-arg>from_change_paths</span>,
          <span class=summary-sig-arg>pool</span>)</span></code>
<br />
Diff source =&gt; cb (or cb =&gt; wc if from_changes_paths is not None).</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#MakeLocalDiffTree" class="summary-sig-name"><code>MakeLocalDiffTree</code></a>(<span class=summary-sig-arg>repo</span>,
          <span class=summary-sig-arg>cb</span>,
          <span class=summary-sig-arg>from_change_paths</span>,
          <span class=summary-sig-arg>callback</span>,
          <span class=summary-sig-arg>tmpdir</span>,
          <span class=summary-sig-arg>pool</span>)</span></code>
<br />
Build two local trees for diffing; pass file pairs to callback.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#Merge" class="summary-sig-name"><code>Merge</code></a>(<span class=summary-sig-arg>cb</span>,
          <span class=summary-sig-arg>project</span>,
          <span class=summary-sig-arg>_wc</span>,
          <span class=summary-sig-arg>subpath</span>,
          <span class=summary-sig-arg>config</span>,
          <span class=summary-sig-arg>pool</span>)</span></code>
<br />
Merge ChangeBranch cb into WorkingCopy _wc; return a new 
ChangeBranch.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#RandomBranchName" class="summary-sig-name"><code>RandomBranchName</code></a>(<span class=summary-sig-arg>length</span>)</span></code>
<br />
Return a random branchname of length 'length'.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#UniqueChangeName" class="summary-sig-name"><code>UniqueChangeName</code></a>(<span class=summary-sig-arg>project</span>,
          <span class=summary-sig-arg>username</span>,
          <span class=summary-sig-arg>base</span>,
          <span class=summary-sig-arg>pool</span>)</span></code>
<br />
Return a unique change name starting with base.</td></tr>
<tr><td align="right" valign="top" width="15%"><font size="-1">&nbsp;</font></td>
  <td><code><span class="summary-sig"><a href="gvn.changebranch-module.html#UserChangeNames" class="summary-sig-name"><code>UserChangeNames</code></a>(<span class=summary-sig-arg>project</span>,
          <span class=summary-sig-arg>user</span>,
          <span class=summary-sig-arg>pool</span>)</span></code>
<br />
Return a generator yielding change branch names for user.</td></tr>
</table><br />


<!-- =========== START OF FUNCTION DETAILS =========== -->
<table class="details" border="1" cellpadding="3" cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="details">
  <th colspan="2">Function Details</th></tr>
</table>

<a name="AllChangeNames"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">AllChangeNames</span>(<span class=sig-arg>project</span>,
          <span class=sig-arg>pool</span>)</span>
  </h3>
  Return a generator yielding all change branch names.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="Diff"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">Diff</span>(<span class=sig-arg>repo</span>,
          <span class=sig-arg>cb</span>,
          <span class=sig-arg>fp</span>,
          <span class=sig-arg>diff_command</span>,
          <span class=sig-arg>from_change_paths</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>pool</span>=<span class=sig-default>None</span>)</span>
  </h3>
<pre class="literalblock">
Diff source =&gt; cb (or cb =&gt; wc if from_changes_paths is not None).

Arguments:
repo              -- Repository cb is in
cb                -- ChangeBranch to diff
fp                -- file-like object to write diff output to (only the
                     write method must exist)
diff_command      -- 'internal', 'tkdiff', or a custom command to use to
                     diff file pairs
from_change_paths -- see MakeLocalDiffTree
pool              -- memory pool
</pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="MakeLocalDiffTree"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">MakeLocalDiffTree</span>(<span class=sig-arg>repo</span>,
          <span class=sig-arg>cb</span>,
          <span class=sig-arg>from_change_paths</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>callback</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>tmpdir</span>=<span class=sig-default>None</span>,
          <span class=sig-arg>pool</span>=<span class=sig-default>None</span>)</span>
  </h3>
  <p>Build two local trees for diffing; pass file pairs to callback.</p>
  <p>To make this crap even messier, from_change_paths indicates that 
  we're diffing cb =&gt; wc rather than source =&gt; cb; 
  from_change_paths may be None or a list of paths to diff.</p>
  Arguments: repo -- Repository to get files from cb -- ChangeBranch 
  whose files to get from_change_paths -- list of paths to diff from 
  changebranch to local callback -- callable(change, old, new) for each 
  pair tmpdir -- directory to build trees in pool -- memory pool
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="Merge"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">Merge</span>(<span class=sig-arg>cb</span>,
          <span class=sig-arg>project</span>,
          <span class=sig-arg>_wc</span>,
          <span class=sig-arg>subpath</span>,
          <span class=sig-arg>config</span>,
          <span class=sig-arg>pool</span>)</span>
  </h3>
  <p>Merge ChangeBranch cb into WorkingCopy _wc; return a new 
  ChangeBranch.</p>
  The Config and Pool objects config and pool are used to create the 
  new ChangeBranch object, which is then snapshotted and returned. If the 
  old ChangeBranch belongs to the user on whose behalf the caller is 
  acting, return a new snapshotted ChangeBranch, but re-using the same 
  underlying changebranch.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="RandomBranchName"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">RandomBranchName</span>(<span class=sig-arg>length</span>=<span class=sig-default>4</span>)</span>
  </h3>
<pre class="literalblock">
Return a random branchname of length 'length'.

Branchnames are only lowercase characters and numbers, excluding:
   lower case 'o' and the number 0 so as not to be confused
   lower case 'l' and the number 1 so as not to be confused

Letters and numbers alternate beginning with a letter.

Examples of a 4 character branchname:  'a2i3', 'w2b8', 'd5j4'.

Uses of names returned by this method should be wrapped in
UniqueChangeName() to ensure uniqueness.
</pre>
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="UniqueChangeName"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">UniqueChangeName</span>(<span class=sig-arg>project</span>,
          <span class=sig-arg>username</span>,
          <span class=sig-arg>base</span>,
          <span class=sig-arg>pool</span>)</span>
  </h3>
  <p>Return a unique change name starting with base.</p>
  If base is available, just return that, otherwise try appending 
  numbers to it until finding a unique name.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>

<a name="UserChangeNames"></a>
<table width="100%" class="func-details" bgcolor="#e0e0e0"><tr><td>
  <h3><span class="sig"><span class="sig-name">UserChangeNames</span>(<span class=sig-arg>project</span>,
          <span class=sig-arg>user</span>,
          <span class=sig-arg>pool</span>)</span>
  </h3>
  Return a generator yielding change branch names for user.
  <dl><dt></dt><dd>
  </dd></dl>
</td></tr></table>
<br />


<!-- =========== START OF NAVBAR =========== -->
<table class="navbar" border="0" width="100%" cellpadding="0" bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="center">
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="gvn-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="trees.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="indices.html">Index</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar">&nbsp;&nbsp;&nbsp;<a class="navbar" href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
    <th class="navbar" align="right" width="100%">
      <table border="0" cellpadding="0" cellspacing="0">
      <tr><th class="navbar" align="center">
        <p class="nomargin">
          <a class="navbar" target="_top" href="http://code.google.com/p/gvn/">Project&nbsp;Homepage</a>
      </p></th></tr></table>
    </th>
  </tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td align="left"><font size="-2">Generated by Epydoc 2.1 on Tue Jul 17 16:51:46 2007</font></td>
    <td align="right"><a href="http://epydoc.sourceforge.net"
                      ><font size="-2">http://epydoc.sf.net</font></a></td>
  </tr>
</table>
</body>
</html>
